var config=require('../server')
var mongoose = require('mongoose'),
config_mongodb = require('./config')['mongodb'];
mongoose.Promise = global.Promise;
// mongoose.connect(config.db,{useMongoClient: true});
// mongoose.createConnection(config.db, { promiseLibrary: require('bluebird') });
mongoose.connect(config_mongodb.url,config_mongodb.opts);
//mongoose.connect("mongodb://127.0.0.1:27017/dataSummary",config_mongodb.opts);

module.exports = mongoose;
